<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/oa/workplan.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			var page = sys_fill_parm('queryForm');
			query_workplan(page);
		}
	});
});
function exportExcel() {
	var suc = '';
	$('#ptypeObjList').find('.pc').each(function () {
		suc += $(this).val() + ',';
	});
	if (suc.length > 0) {
		suc = suc.substring(0, suc.length - 1);
		window.location.href = "${contextPath}m/workplan-excelExport.html?" + '&suc=' + suc + '&pageSize=10' + $('#queryForm').serialize();
	}else{
		window.location.href = "${contextPath}m/workplan-excelExport.html?" + $('#queryForm').serialize();
	}
	return false;
}
</script>

<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>

<form id="queryForm">
	<table class="search_term_table">
		<tr>
			<th style="width: 50px;">创建人</th>
			<td>
				<div class="input-group">
					<div id="ptypeObjList" class="cjr"></div>
					<button class="btn btn-primary" onclick="javascript: selectUser_workplan($(this));return false;" title="选择该物品所属类型" type="button"><i class="icon-search"></i></button>
				</div>
			</td>
		</tr>
		<tr>
			<th style="width: 70px;">计划名称</th>
			<td><input type="text" name="name" style="width:80px;"/></td>
			<th style="width: 70px;">创建时间</th>
			<td><input type="text" name="time1" style="width: 80px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
				到
				<input type="text" name="time2" style="width: 80px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
			</td>
			<td style="text-align:right;">
				<button class="btn btn-info" onclick="javascript: query_workplan(); return false;"><i class="icon-search"></i> 查 询 </button>
				<a class="btn btn-primary" onclick="javascript:exportExcel(); return false;"><i class="icon-file"></i> 导 出</a>
			</td>
		</tr>
	</table>
</form>
<div id="tempListDiv" style="display:none;">
	<div class="filter-table rep" style="margin-left:5px; margin-bottom:5px;">
		<input class="pc" type="hidden" />
		<button type="button" class="close" data-dismiss="alert" onclick="javascript: delete_workplan($(this));">&times;</button>
		<a class="title" href="#"></a>
	</div>
</div>

<div id="resultList"></div>
